Page({
  data: {
    address: '',
    type: '',
    message: '',
    contact: ''
  },

  onLoad(options) {
    const { id } = options
    wx.request({
      url: 'http://localhost:9000/data/' + id,
      success: (res) => {
        let { address, type, message, contact } = res.data
        this.setData({
          address,
          message,
          contact,
          type
        })
      }
    })
  }
})